/**
    Copyright (C) 2012 Guido Ludwig

    This file is part of JATT.
	http://code.google.com/p/jatt/

    JATT is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package de.guidoludwig.jatt.chain.commands.config;


/**
 * @author Guido Ludwig
 */
public class ClearConfig extends JATTCommandConfigBase {

    public static final String PROPERTY_REMOVE_ALTERNATIVE_ARTWORK = "removeAlternativeArtwork";
    public static final String PROPERTY_REMOVE_ARTWORK_TAGS = "removeArtworkTags";
    public static final String PROPERTY_REMOVE_FOLDER_IMAGE = "removeFolderImage";

    private static final long serialVersionUID = 1L;

    private boolean removeFolderImage;
    private boolean removeArtworkTags;
    private boolean removeAlternativeArtwork;

    public ClearConfig() {
    	setActive(false);
        removeFolderImage = false;
        removeArtworkTags = false;
        removeAlternativeArtwork = true;
    }

    @Override
    public String getTitle() {
        return "Clear Artwork Tags";
    }

    @Override
    public String getDescription() {
        return "Clears all Artwork tags in audio files. It is recommended to create a backup using the ExtractArtworkCommand";
    }

    public boolean isRemoveFolderImage() {
        return removeFolderImage;
    }

    public void setRemoveFolderImage(boolean newRemoveFolderImage) {
        boolean oldRemoveFolderImage = isRemoveFolderImage();
        removeFolderImage = newRemoveFolderImage;
        firePropertyChange(PROPERTY_REMOVE_FOLDER_IMAGE, oldRemoveFolderImage,
            removeFolderImage);
    }

    public boolean isRemoveArtworkTags() {
        return removeArtworkTags;
    }

    public void setRemoveArtworkTags(boolean newRemoveArtworkTags) {
        boolean oldRemoveArtworkTags = isRemoveArtworkTags();
        removeArtworkTags = newRemoveArtworkTags;
        firePropertyChange(PROPERTY_REMOVE_ARTWORK_TAGS, oldRemoveArtworkTags,
            removeArtworkTags);
    }

	public boolean isRemoveAlternativeArtwork() {
		return removeAlternativeArtwork;
	}

	public void setRemoveAlternativeArtwork(boolean removeAlternativeArtwork) {
        boolean old = isRemoveAlternativeArtwork();
		this.removeAlternativeArtwork = removeAlternativeArtwork;
        firePropertyChange(PROPERTY_REMOVE_ALTERNATIVE_ARTWORK, old,
                removeAlternativeArtwork);
	}

}
